package com.alibaba.citrus.ots.unified.inventory.contants;

import java.util.Arrays;
import java.util.Objects;

public enum SaleCompareEnum {
    sapSaleOrderId("销售订单", "sapSaleOrderId"),
    outLineId("行项目", "outLineId"),
    goodsCode("物料编码", "goodsCode"),
    orderQuantity("订单数量", "orderQuantity"),
    nkPrice("奶卡价格(ZP02)", "nkPrice"),
    orderRegularPrice("订单常规价格(ZP01)", "orderRegularPrice"),
    regularPriceWithRebate("订单含返点常规价格(ZP01+ZK18)", "regularPriceWithRebate"),
    activityPrice("订单活动价格(ZP03)", "activityPrice"),
    dctBeforePrice("订单折前价格(ZK99)", "dctBeforePrice"),
    //createTime("创建时间", "createTime"),
    discountedPrice("订单折后价格(KZWI1)", "discountedPrice"),
    regularAmountWithRebate("订单含返点常规金额(ZP01+ZK18)", "regularAmountWithRebate"),
    beforeDiscountedAmount("订单折前金额(ZK99)", "beforeDiscountedAmount"),
    discount("订单固定折扣(ZK01)", "discount"),
    afterDiscountAmount("订单折后金额(KZWI1)", "afterDiscountAmount"),
    deliveryOrderId("交货单", "deliveryOrderId"),
    deliveryNoteLineItemNo("交货单行项目号", "deliveryNoteLineItemNo"),
    deliveryNoteCreateDate("交货单创建日期", "deliveryNoteCreateDate"),
    shipmentPostingDate("发货过账日期", "shipmentPostingDate"),
    deliveryOrdersQuality("交货单数量", "deliveryOrdersQuality"),
    podStatus("POD状态", "podStatus"),
    afterPodQuality("POD后数量", "afterPodQuality"),
    beforeDiscountedAmountOfDeliveryNote("交货单折前金额(ZK99)", "beforeDiscountedAmountOfDeliveryNote"),
    afterDiscountAmountOfDeliveryNote("交货单折后金额(KZWI1)", "afterDiscountAmountOfDeliveryNote"),
    deliveryQuantityAndBaseUnit("交货单数量/基本单位", "deliveryQuantityAndBaseUnit"),
    receiptLineItemNo("发票行项目号", "receiptLineItemNo"),
    receiptDate("出具发票日期", "receiptDate"),
    receiptCreateDate("发票创建日期", "receiptCreateDate"),
    receiptQuantity("发票数量", "receiptQuantity"),
    receiptAmount("发票金额", "receiptAmount"),
    receiptPrice("发票价格", "receiptPrice"),
    frontOrderBizId("预报单号", "frontOrderBizId"),
    orderGmtCreate("订单创建日期", "orderGmtCreate"),
    deliveryDate("交货日期", "deliveryDate"),
    orderType("订单类型", "orderType"),
    receiptNo("发票号", "receiptNo");

    private String label;
    private String value;

    SaleCompareEnum(String label, String value) {
        this.label = label;
        this.value = value;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static SaleCompareEnum of(String value) {
        return Arrays.stream(SaleCompareEnum.values()).filter(source -> Objects.equals(value, source.getValue())).findFirst().orElse(null);
    }

}